home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-10-30 | 937 b | 34 lines | [TEXT/GEOL] |
- Item 0812790 27-Oct-89 21:56
-
- From: SHEBANOW1 Shebanow, Andrew
-
- To: MACAPP.TECH$ MACAPP Tech
-
- Sub: RE>C++ VMT implementation
-
- Attn: MacApp.TECH$
- SentBy: Andrew Shebanow
- Reply to: RE>C++ VMT implementation?
- Apple has extended C++ to support Object Pascal style "VMT"s. There is a
- predefined base class called PascalObject. If a class descends from
- PascalObject, it uses the Object Pascal dispatching mechanism, and its memory
- is allocated by NewHandle instead of malloc.
-
- A typical (mimimal) Object Pascal compatible class definition looks something
- like
- this:
-
- class TMyView : public TView {
- public:
- virtual pascal Draw(Rect* area);
- }
-
- Inter-language compatibility is good enough that you can define a class in
- Pascal, subclass it in C++, and then subclass the C++ class in Pascal again.
-
- Andrew Shebanow
- MacDTS
- Apple Computer
-
-
-